Enhancement/upload multiple files #393
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces support for uploading multiple specific files to Google Cloud Storage by allowing paths to be specified using newline-separated values or YAML pipe syntax. It also includes updates to the documentation, refactoring of the codebase to handle multiple paths, and new tests to ensure functionality.
Feature Addition: Support for Multiple File Uploads
src/util.ts
: Added theprocessMultiplePaths
function to handle multiple paths specified in thepath
input, allowing users to upload multiple specific files by separating paths with newlines. This includes logic for handling single paths and deduplicating files.src/main.ts
: Refactored therun
function to useprocessMultiplePaths
for processing multiple paths and updating related variables such asfiles
,absoluteRoot
, andgivenRoot
. [1] [2] [3] [4] [5]Documentation Updates
README.md
: Added a new section, "Upload Multiple Files," with examples demonstrating how to use newline-separated values or YAML pipe syntax to specify multiple paths for file uploads.action.yml
: Updated the description of thepath
input to clarify that multiple paths can be specified using newlines, with examples provided. [1] [2]Testing Enhancements
tests/multiple-paths.test.ts
: Added comprehensive tests for the new functionality, including scenarios for uploading multiple files, handling empty lines, and verifying single-path behavior. Mocking and assertions ensure correctness.